package com.s2sh.service;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.s2sh.dao.ItemsDao;
import com.s2sh.po.Items;

public class ItemsService {
	
//	@Autowired
	private ItemsDao itemsdao;
	
	public ItemsService() {
		super();
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext-dao.xml");
		this.itemsdao = (ItemsDao) context.getBean("itemsDao");
	}

	public List<Items> QueryItemsById(Integer id){
		
		return itemsdao.queryById(id);
	}
	
	public List<Items> listItems(){
		
		return itemsdao.listItems();
	}
	
	public ItemsDao getItemsdao() {
		return itemsdao;
	}

	public void setItemsdao(ItemsDao itemsdao) {
		this.itemsdao = itemsdao;
	}

}
